﻿using System;
using Microsoft.Xna.Framework;

namespace Terraria.DataStructures
{
	// Token: 0x0200047A RID: 1146
	public class ColorSlidersSet
	{
		// Token: 0x06002696 RID: 9878 RVA: 0x004921E0 File Offset: 0x004903E0
		public void SetHSL(Color color)
		{
			Vector3 vector = Main.rgbToHsl(color);
			this.Hue = vector.X;
			this.Saturation = vector.Y;
			this.Luminance = vector.Z;
		}

		// Token: 0x06002697 RID: 9879 RVA: 0x0001ADD4 File Offset: 0x00018FD4
		public void SetHSL(Vector3 vector)
		{
			this.Hue = vector.X;
			this.Saturation = vector.Y;
			this.Luminance = vector.Z;
		}

		// Token: 0x06002698 RID: 9880 RVA: 0x00492218 File Offset: 0x00490418
		public Color GetColor()
		{
			Color result = Main.hslToRgb(this.Hue, this.Saturation, this.Luminance);
			result.A = (byte)(this.Alpha * 255f);
			return result;
		}

		// Token: 0x06002699 RID: 9881 RVA: 0x0001ADFA File Offset: 0x00018FFA
		public Vector3 GetHSLVector()
		{
			return new Vector3(this.Hue, this.Saturation, this.Luminance);
		}

		// Token: 0x0600269A RID: 9882 RVA: 0x0001AE13 File Offset: 0x00019013
		public void ApplyToMainLegacyBars()
		{
			Main.hBar = this.Hue;
			Main.sBar = this.Saturation;
			Main.lBar = this.Luminance;
			Main.aBar = this.Alpha;
		}

		// Token: 0x04004350 RID: 17232
		public float Hue;

		// Token: 0x04004351 RID: 17233
		public float Saturation;

		// Token: 0x04004352 RID: 17234
		public float Luminance;

		// Token: 0x04004353 RID: 17235
		public float Alpha = 1f;
	}
}
